const mongoose = require("mongoose");
/* love:点赞人; loved:被赞人 */
const schema = new mongoose.Schema({
  love: { type: String },
  loved: { type: String },
  time: { type: String, required: true },
})

module.exports = mongoose.model("Like", schema)


/*查询自己被多少人点过赞 或者给多少人点过赞*/
/* var countQuery = model.where({ 'color': 'black' }).count();

query.count({ color: 'black' }).count(callback)

query.count({ color: 'black' }, callback)

query.where('color', 'black').count(function (err, count) {
  if (err) return handleError(err);
  console.log('there are %d kittens', count);
}) */



/* 点赞人:
被赞人:
 */